Failed to create a function SOLVED
От | Roy MacGregor Paterson |
---|---|
Тема | Failed to create a function SOLVED |
Дата | |
Msg-id | p06010201bbf34cb5ac1a@[192.168.1.102] обсуждение исходный текст |
Ответ на | Failed to create a function (Roy MacGregor Paterson <roy@macgregortech.com>) |
Ответы |
Re: Failed to create a function SOLVED
|
Список | pgsql-novice |
Thanks to all who helped out on this problem. RTFM and trial by Kafka-esque error are truly wonderful things. One of the problems I was having with creating functions was the strange behaviour of psql (responding with a list of command options for every line pasted) when I was copying and pasting them from BBEdit files, like this snippet... webdav=# CREATE FUNCTION trigger_WDVolume () RETURNS opaque AS ' webdav'# DECLARE webdav'# ABORT BEGIN COMMENT CREATE DROP GRANT LOAD NOTIFY REVOKE SET UNLISTEN ALTER CLOSE COMMIT DECLARE EXPLAIN INSERT LOCK REINDEX ROLLBACK SHOW UPDATE ANALYZE CLUSTER COPY DELETE FETCH LISTEN MOVE RESET SELECT TRUNCATE VACUUM webdav'# -- set the default disk space webdav'# ABORT BEGIN COMMENT CREATE DROP GRANT LOAD NOTIFY REVOKE SET UNLISTEN ALTER CLOSE COMMIT DECLARE EXPLAIN INSERT LOCK REINDEX ROLLBACK SHOW UPDATE ANALYZE CLUSTER COPY DELETE FETCH LISTEN MOVE RESET SELECT TRUNCATE VACUUM ...it turns out that, despite comments about psql being quite happy with all whitespace, it's not: it doesn't like tab chars (in PG 7.3.3 on Mac OS X at least). Convert tabs to 2xspaces and all is tickety-boo. Roy -- -------------------- Roy MacGregor Paterson MacGregorTech t: +44 (0) 20 7584 7891 f: +44 (0) 20 7589 6223 m: +44 (0) 7803 163 938 w: www.macgregortech.com e: roy@macgregortech.com --------------------
В списке pgsql-novice по дате отправления: